1. Field of the Invention
The present invention relates to a data processor for data compression of image data.
2. Description of the Prior Art
An international standard for color image coding by a Joint Photographic Experts Group (JPEG) is a known coding technique of image data. In the color image coding, image data is divided into processing blocks each of a prescribed size of pixel matrix (normally 8*8 pixel matrix) and image data in a processing block is subjected to two dimensional pixel discrete cosine transformation (DCT). Then, weights are given to the DCT data, and the DCT data is subjected to nonlinear quantization and entropy coding. The decoding of the image data is performed with processing reverse to the above-mentioned processing. However, if this color image coding is applied to an image including characters and half-tone images, a character image is liable to be deteriorated and a half-tone image is liable to have a lower compression ratio. In order to solve the problems, it is proposed first to discriminate if an image to be coded is a character image or a half-tone image and second to select a quantization table used for the quantization according the discrimination.
However, this method has a problem that the discrimination takes a long time. It is also a problem that if the discrimination is erroneous, an erroneous quantization table is selected and this causes block distortion, mosquito noises and the like in an image. The precision of discrimination may be enhanced by increasing a size of the processing block. However, if the size of the processing block is increased, an amount of data to be processed after the quantization process becomes very large, and a processing speed of data decreases. Another problem on the discrimination of image is that an erroneous discrimination is liable to occur especially on a dot image wherein an image is expressed as an assembly of minute dots.